Skip to content

fix(autoware_agnocast_wrapper, autoware_ground_filter): support the message_filters API of Lyrical - #1578

Open
xmfcx wants to merge 1 commit into
mainfrom
fix/agnocast-wrapper-message-filters-lyrical
Open

xmfcx wants to merge 1 commit into
mainfrom
fix/agnocast-wrapper-message-filters-lyrical

Conversation

@xmfcx

@xmfcx xmfcx commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Description

On ROS 2 Lyrical, message_filters::Subscriber has one template parameter and takes rclcpp::QoS. Humble and Jazzy take rmw_qos_profile_t, and their second template parameter defaults to rclcpp::Node.

  • autoware_agnocast_wrapper: the non-Agnocast Subscriber<M> derives from ::message_filters::Subscriber<M>. A private to_base_qos() converts the rmw_qos_profile_t argument to rclcpp::QoS on Lyrical. The public API of the wrapper does not change.
  • autoware_ground_filter: a local to_message_filters_qos() helper gives the QoS to subscribe() in the type that message_filters expects.

Both helpers select the type with __has_include(<message_filters/subscriber.h>). Lyrical removed this header. On Humble and Jazzy, the code compiles to the same types and QoS values as before.

Related links

Parent Issue:

How was this PR tested?

See the Verification block below.

Notes for reviewers

On Lyrical, both packages also need two other changes. The first is the .hpp includes of the separate header PR (fix: include the .hpp headers of tf2, tf2_ros and message_filters). The second is the ament_target_dependencies() replacement of this issue:

Universe needs this PR on Lyrical, because autoware_pointcloud_preprocessor, autoware_object_merger, autoware_simple_object_merger and autoware_traffic_light_multi_camera_fusion use the wrapper Subscriber.

The Agnocast-enabled branch (USE_AGNOCAST_ENABLED) still uses ::message_filters::Subscriber<M, rclcpp::Node> and rmw_qos_profile_t. This PR does not change it. Upstream agnocast needs its own Lyrical fixes first, and the Agnocast-enabled build was not tried on Lyrical. It is an open item.

This PR and the draft PR below change the same Subscriber class. The one that merges second needs a small rebase:

Interface changes

None.

Effects on system behavior

None on Humble and Jazzy. On Lyrical, the wrapper Subscriber keeps the history, depth, reliability and durability of the given profile.

AI usage

AI usage: Written with Claude Code from a local Lyrical build of the whole workspace.

Self-review: A clean-context agent read commit 965030d, compared it with the live Lyrical diff, and checked every quoted number against the remote and Lyrical logs. Two rounds ran, a review and a verification, and neither ran its own build, because the saved logs show each result. All three findings are fixed in this text: the failed first probe run, the reason for the unchanged Agnocast code, and the cut Humble test lines. Still open is the Agnocast-enabled code path on Lyrical. The wrapper node tests passed on Humble and Jazzy after this review.

Verification: The branch built on Humble and Jazzy in the universe-devel-humble-20261201 and universe-devel-jazzy-20261201 images. All tests of autoware_agnocast_wrapper and autoware_ground_filter passed on both (226 tests, 0 failures), and a QoS probe passed on both. On Lyrical the branch alone stops in CMake, and the full workspace with all Lyrical changes built 576 of 576.

Humble and Jazzy build of the branch

Remote runner, job core-c3: remote-build.sh <distro> core-c3 ... -- --packages-select autoware_agnocast_wrapper autoware_ground_filter c3_mf_probe with RUN_TESTS=1. Core packages that the branch does not change come from /opt/autoware of the image (Autoware main).

  • Humble (universe-devel-humble-20261201 image): Summary: 3 packages finished [1min 5s]
  • Jazzy (universe-devel-jazzy-20261201 image): Summary: 3 packages finished [1min 11s]
  • Jazzy autoware_ground_filter unit tests: test_ground_filter.gtest.xml: 14 tests, 0 errors, 0 failures, test_sanity_check.gtest.xml: 5 tests, 0 errors, 0 failures
  • Humble: test_sanity_check.gtest.xml: 5 tests, 0 errors, 0 failures. The test_ground_filter result was not seen, because the helper prints only the last 60 lines of colcon test-result.
  • Every test that creates a node failed in this job: test_ground_filter_integration (5 of 5), the node tests of autoware_agnocast_wrapper, and the c3_mf_probe test (c3_mf_probe.xml: 1 test, 1 error). The error is rmw_create_node: failed to create domain, after selected interface "lo" is not multicast-capable. The runner container has only lo, and the default CycloneDDS configuration needs multicast.

autoware_ground_filter tests on Humble

Remote runner, job core-c3-gf-tests: only the branch folder of autoware_ground_filter, --packages-select autoware_ground_filter with RUN_TESTS=1. The package does not use the wrapper.

  • test_ground_filter.gtest.xml: 14 tests, 0 errors, 0 failures, test_sanity_check.gtest.xml: 5 tests, 0 errors, 0 failures
  • test_ground_filter_integration.gtest.xml: 5 tests, 0 errors, 5 failures, again with failed to initialize rcl node from the same CycloneDDS problem.

autoware_ground_filter tests with a CycloneDDS configuration file

Remote runner, job core-c3-gf-dds, Humble and Jazzy in parallel. The source is a copy of the branch folder with one test-only change, which is not part of this PR: ENV CYCLONEDDS_URI=file://${CMAKE_CURRENT_SOURCE_DIR}/test/cyclonedds.xml on test_ground_filter_integration. The file turns off multicast and sets localhost as the peer.

  • Humble (universe-devel-humble-20261201 image): test_ground_filter_integration.gtest.xml: 5 tests, 0 errors, 0 failures, Summary: 58 tests, 0 errors, 0 failures, 11 skipped
  • Jazzy (universe-devel-jazzy-20261201 image): test_ground_filter_integration.gtest.xml: 5 tests, 0 errors, 0 failures, Summary: 58 tests, 0 errors, 0 failures, 11 skipped
  • The integration test covers the use_indices path that this PR changes (PublishesWhenIndicesInputIsEnabled) and the approximate sync path.
  • The node tests of autoware_agnocast_wrapper did not run in this job. They ran in the last section.

QoS probe on Humble and Jazzy

c3_mf_probe is a small local package, not part of this PR. It creates three wrapper Subscriber objects: one with rmw_qos_profile_sensor_data in the constructor, one with the default profile through subscribe(), and one with depth 3 and TRANSIENT_LOCAL. It then compares the actual QoS of each subscription and joins two of them with an ExactTime Synchronizer. The test fails if a value differs or if fewer than 3 synchronized callbacks arrive within 5 s.

  • The first probe run, in job core-c3, failed on both distros with failed to create domain (see the first section).
  • The probe then ran again in its own job, core-c3-probe (--packages-select autoware_agnocast_wrapper c3_mf_probe, RUN_TESTS=1), with a CycloneDDS configuration file that turns off multicast. The results below come from that job.
  • Humble (universe-devel-humble-20261201 image): Summary: 2 packages finished [1min 27s], c3_mf_probe.xml: 1 test, 0 errors, 0 failures, 0 skipped
  • Jazzy (universe-devel-jazzy-20261201 image): Summary: 2 packages finished [28.2s], c3_mf_probe.xml: 1 test, 0 errors, 0 failures, 0 skipped

Humble and Jazzy tests after the runner fix

Remote runner, job tr-c3: RUN_TESTS=1 remote-build.sh <distro> tr-c3 ... -- --packages-select autoware_agnocast_wrapper autoware_ground_filter, on the branch without any test-only change. The helper now gives every job a CycloneDDS configuration file that turns off multicast and sets localhost as the peer.

  • Humble (universe-devel-humble-20261201 image): Summary: 226 tests, 0 errors, 0 failures, 38 skipped
  • Jazzy (universe-devel-jazzy-20261201 image): Summary: 226 tests, 0 errors, 0 failures, 38 skipped
  • On both: test_autoware_agnocast_wrapper.gtest.xml: 31 tests, 0 errors, 0 failures, test_autoware_node.xunit.xml: 66 tests, 0 errors, 0 failures, test_ground_filter_integration.gtest.xml: 5 tests, 0 errors, 0 failures

Lyrical

Local container, Ubuntu 26.04, GCC 15.2, -Wno-error=deprecated-declarations.

  • The branch alone: autoware_agnocast_wrapper stops with Unknown CMake command "ament_target_dependencies". It needs the ament_target_dependencies() replacement of Export CMake targets from Autoware packages and replace ament_target_dependencies autoware#7412 and the header PR first.
  • Full workspace with all Lyrical changes, this one included: 576 packages finished.
  • The same probe against that install printed ctor sensor_data: history=1 depth=5 reliability=2 durability=2, subscribe default: history=1 depth=10 reliability=1 durability=2, subscribe custom: history=1 depth=3 reliability=1 durability=1, synchronized callbacks: 3 (pairs sent: 3).
  • Not run: the Agnocast-enabled build (ENABLE_AGNOCAST=1) on any distro.

…essage_filters API of Lyrical

On ROS 2 Lyrical, message_filters::Subscriber has one template parameter and takes rclcpp::QoS instead of rmw_qos_profile_t. Humble and Jazzy keep rmw_qos_profile_t and default the second template parameter to rclcpp::Node.

The non-Agnocast Subscriber of autoware_agnocast_wrapper derives from Subscriber<M> and converts its QoS with to_base_qos(). autoware_ground_filter passes its QoS through a local to_message_filters_qos() helper. Both select the type with __has_include(<message_filters/subscriber.h>), which Lyrical removed. Humble and Jazzy keep the same types and values as before.

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
@xmfcx xmfcx self-assigned this Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@xmfcx
xmfcx requested a review from mitsudome-r December 1, 2026 19:26
@xmfcx xmfcx added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Dec 1, 2026
@codecov

codecov Bot commented Dec 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.34%. Comparing base (29db97d) to head (965030d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1578   +/-   ##
=======================================
  Coverage   82.34%   82.34%           
=======================================
  Files         421      421           
  Lines       23903    23904    +1     
  Branches      147      147           
=======================================
+ Hits        19683    19684    +1     
  Misses       4190     4190           
  Partials       30       30           
Flag Coverage Δ *Carryforward flag
full-suite 82.34% <ø> (-0.01%) ⬇️ Carriedforward from 29db97d

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xmfcx
xmfcx marked this pull request as ready for review December 1, 2026 19:54

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant